import request from '@/utils/request'

//分页查询
export const GetCollegeListByPage = (pageNum, pageSize, queryDto) => {
    return request({
        url: '/admin/school/college/findByPage/' + pageNum + '/' + pageSize,
        method: 'get',
        params: queryDto,
    })
}

// 获取所有学院
export const GetAllCollege = () => {
    return request({
        url: '/admin/school/college/getAllCollege',
        method: 'get',
    })
}

// 新增用户的方法
export const SaveCollege = data => {
    return request({
        url: '/admin/school/college/saveCollege',
        method: 'post',
        data: data,
    })
}

// 修改用户数据的方法
export const UpdateCollege = college => {
    return request({
        url: '/admin/school/college/updateCollege',
        method: 'put',
        data: college,
    })
}

// 根据id删除用户
export const DeleteCollegeById = userId => {
    return request({
        url: '/admin/school/college/deleteById/' + userId,
        method: 'delete',
    })
}
